package com.kai.Pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.IndexedColors;

import java.util.Date;

//没背景，白色 fillBackgroundColor从这个枚举类 IndexedColors.WRITE
@HeadStyle(fillPatternType = FillPatternType.NO_FILL,fillBackgroundColor = 1)
// 头字体设置成20
@HeadFontStyle(fontHeightInPoints = 11)
public class DemoData {
    @ExcelProperty("字符串标题")
    private String string;
    @ExcelProperty("日期标题")
    private Date date;
    @ExcelProperty("数字标题")
    private Double doubleData;
    /**
     * 忽略这个字段
     */
     @ExcelIgnore
     private String ignore;

    public DemoData() {
    }

    public DemoData(String string, Date date, Double doubleData, String ignore) {
        this.string = string;
        this.date = date;
        this.doubleData = doubleData;
        this.ignore = ignore;
    }

    public String getString() {
        return string;
    }

    public void setString(String string) {
        this.string = string;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Double getDoubleData() {
        return doubleData;
    }

    public void setDoubleData(Double doubleData) {
        this.doubleData = doubleData;
    }

    public String getIgnore() {
        return ignore;
    }

    public void setIgnore(String ignore) {
        this.ignore = ignore;
    }
}